﻿@{
    ViewBag.Title = ViewBag.ParkingName + "停车区列表";
    Layout = "~/Views/Shared/_Layout.cshtml";

}
@using AFT.Parking.Entity.Parkings;
@using AFT.Parking.Foundation;
@using AFT.Parking.WebSite.Common

@model IPagedList<ParkingAreaParkingsMapping>
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>@ViewBag.ParkingName 停车区列表</h3>

        <div class="clear"></div>
    </div>
    <form id="frm">
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">
                <!-- This is the target div. id must match the href of this div's tab -->
                <div class="notification attention png_bg">
                    名称：@Html.TextBox("name", null, new { @class = "searchBox" })
                    <input type="submit" class="button" id="btnSubmit" value="查询" />
                    @{
                        int parkingId = Convert.ToInt32(ViewBag.ParkingId);
                    }
                    @if (parkingId > 0)
                    {
                        <a href="/parkingAreas/addAreas/@ViewBag.ParkingId">新增停车区</a>
                    }
                </div>
                <table>
                    <thead>
                        <tr>
                            <th>名称</th>
                            <th>停车场名</th>
                            <th>比例（px:m）</th>
                            <th>状态</th>
                            <th>图片</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <td colspan="6">
                                <div class="pagination">
                                    @Html.Pager(Model)
                                </div>
                                <!-- End .pagination -->
                                <div class="clear"></div>
                            </td>
                        </tr>
                    </tfoot>
                    <tbody id="tBodyRows">
                        @foreach (var item in Model.Rows)
                        {
                            <tr id="@("tr"+item.ParkingArea.Id)">
                                <td>
                                    @item.ParkingArea.Name
                                </td>
                                <td>@item.ParkingName</td>
                                <td>@item.ParkingArea.Scale</td>
                                <td>@(item.ParkingArea.IsEnable ? "正常" : "停用")</td>
                                <td><img src="@item.ParkingArea.ImgUrl" style=" cursor:pointer;" width="80px" height="60px" onclick="window.open('@item.ParkingArea.ImgUrl')" /></td>
                                <td>
                                    <a href="/parkingAreas/editeAreas/@item.ParkingArea.Id" title="Edit">编辑</a>
                                    <a href="/MarkCoordinates/MarkCoordinates/@item.ParkingArea.Id" target="_blank">编辑立柱点</a>
                                    <a href="/parkingAreas/locations?parkingAreaId=@item.ParkingArea.Id" target="_blank" title="Edit">查看立柱点</a>
                                    <a href="/parkingAreas/checklocations/@item.ParkingArea.Id" target="_blank" title="Edit">验证坐标点</a>
                                    <a href="/parkingCamera/AreaShares?ParkingAreaId=@item.ParkingArea.Id" target="_blank" title="View">查看停车区域</a>
                                    <a href="/parkingCamera/CameraList?ParkingAreaId=@item.ParkingArea.Id" target="_blank" title="View">查看监测摄像头</a>
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </form>
</div>
